package cn.edu.scau.cmi.zenglinghong.client;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class InterProgrammingClient extends Application {
	public static void main(String[] args) {
		launch(args);
	}

	@Override
	public void start(Stage primaryStage) throws Exception {
		// TODO Auto-generated method stub
		init(primaryStage);
	}

	public static void init(Stage primaryStage) throws Exception {
		// TODO Auto-generated method stub
		Label label = new Label("请选择学生类型");
		Button button1 = new Button("学生");
		Button button2 = new Button("毕业生");
		Button button3 = new Button("在读生");
		TextArea textArea = new TextArea();
		textArea.setEditable(false);
		
		VBox root = new VBox();
		root.setSpacing(20);
		root.getChildren().add(label);
		root.getChildren().add(button1);
		root.getChildren().add(button2);
		root.getChildren().add(button3);
		root.getChildren().add(textArea);
		
		Scene scene = new Scene(root,400,300);
		primaryStage.setScene(scene);
		primaryStage.setTitle("接口编程");
		primaryStage.show();
		
		button1.setOnAction(handle -> {
			textArea.setText("Study hard and you'll improve everyday!!!");
		});
		
		button2.setOnAction(handle -> {
			textArea.setText("007 researching!!!");
		});
		
		button3.setOnAction(handle -> {
			textArea.setText("996 programming!!!");
		});
		
//		Student graduateStudent = new GraduateStudent();
//		graduateStudent.learning();
//		Student undergraduateStudent = new UndergraduateStudent();
//		undergraduateStudent.learning();
	}
	
	
}